#! /bin/bash
SERVER_DIR=$1

   echo -n $"Shutting down $SERVER_NAME: "
    pId=`ps -ef|grep "${SERVER_DIR}/bin/"|grep -v "grep"|awk '{print $2}'`
    if [ ${pId:=0} -eq 0 ] 
    then
       echo "failure: No startup [Failed]"
    else
       kill -9 $pId
       sleep 2
       echo "success [OK]"
    fi
